<template>
  <div id="menuleft">
    <el-row class="tac">
      <el-col :span="24" style="height: 100%;">
        <el-menu default-active="" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" background-color="#333333" text-color="#fff" active-text-color="#ffd04b" style="height: 100%;overflow-y: scroll;overflow-x: hidden">
          <el-menu-item index="1">
            <i class="el-icon-menu"></i> <span slot="title">文章管理</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-menu"></i> <span slot="title">用户管理</span>
          </el-menu-item>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-menu"></i> <span>系统配置</span>
            </template>
            <el-menu-item-group>
              <router-link to="/">
                <el-menu-item index="3-1">菜单配置</el-menu-item>
              </router-link>
              <router-link to="/test">
                <el-menu-item index="3-2">权限配置</el-menu-item>
              </router-link>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-menu"></i> <span>爬虫配置</span>
            </template>
            <el-menu-item-group>
              <router-link to="/crawlsitelist">
                <el-menu-item index="4-1">站点列表</el-menu-item>
              </router-link>
              <router-link to="/test">
                <el-menu-item index="4-2">测试</el-menu-item>
              </router-link>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>

<style scoped>
  #menuleft {
    position: absolute;
    width: 200px;
    height: calc(100% - 60px);
    overflow: hidden;
  }

  .tac {
    width: calc(100% + 10px);
    height: 100%;
  }

  .el-menu-vertical-demo {
    text-align: left;
  }

  .el-submenu .el-menu-item {
    padding-left: 65px !important;
    text-decoration: none !important;
  }

  a {
    text-decoration: none !important;
  }
</style>